package data

import (
	"github.com/aide-cloud/universal/alog"
	"github.com/aide-cloud/universal/connect"
	"gorm.io/gorm"
)

// GetDB returns the database connection
func GetDB(log alog.Logger) *gorm.DB {
	dsn := "root:12345678@tcp(localhost:3306)/electric_app?charset=utf8&parseTime=True&loc=Local"
	db := connect.GetMysqlConnectSingle("electric_app", dsn, log)
	db = db.Debug()

	return db
}
